package com.liao.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liao.entity.Book;
import com.liao.entity.BookCategory;
import com.liao.entity.BookPublisher;
import com.liao.mapper.BookMapper;
import com.liao.mapper.BookPublisherMapper;
import com.liao.service.BookPublisherService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;


@Service
public class BookPublisherServiceImpl extends ServiceImpl<BookPublisherMapper, BookPublisher>  implements BookPublisherService {
    @Override
    public List<String> getAllPublishers() {
        List<String > bookPublisherList = baseMapper.selectList(null).stream().map(BookPublisher::getName).collect(Collectors.toList());
        return bookPublisherList;
    }
}
